{template '_header'}
<div class="page-heading">
    <h2><i class="fa fa-circle-o"></i>商城页面设置</h2>
</div>

<form action="" {ifp 'diypage.shop.page.save'}method="post"{/if} class="form-horizontal form-validate">

    <div class="alert alert-danger">注意：商城页面如果是diy页面，自定义菜单请至diy页面编辑中设置。</div>


    <div class="form-group-title">系统页面</div>

    <div class="form-group">
        <label class="col-sm-2 control-label">商城首页</label>
        <div class="col-sm-9 col-xs-12">
            <select class="form-control valid" {ifp 'diypage.shop.page.save'}name="page[home]"{else} disabled{/if}>
                <option value="">系统默认</option>
                {loop $home_list $item}
                <option value="{$item['id']}" {if $data['page']['home']==$item['id']}selected="selected"{/if}>{$item['name']}</option>
                {/loop}
            </select>
        </div>
    </div>

    {if $_W['plugin']!='merch' && !isset($_W['merch'])}
        <div class="form-group">
            <label class="col-sm-2 control-label">会员中心</label>
            <div class="col-sm-9 col-xs-12">
                <select class="form-control valid" {ifp 'diypage.shop.page.save'}name="page[member]"{else} disabled{/if}>
                <option value="">系统默认</option>
                {loop $member_list $item}
                <option value="{$item['id']}" {if $data['page']['member']==$item['id']}selected="selected"{/if}>{$item['name']}</option>
                {/loop}
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">商品详情</label>
            <div class="col-sm-9 col-xs-12">
                <select class="form-control valid" {ifp 'diypage.shop.page.save'}name="page[detail]"{else} disabled{/if}>
                <option value="">系统默认</option>
                {loop $detail_list $item}
                <option value="{$item['id']}" {if $data['page']['detail']==$item['id']}selected="selected"{/if}>{$item['name']}</option>
                {/loop}
                </select>
                <span class="help-block">提示：单商品模板设置请到商品设置中设置，商品详情页不支持自定义商城菜单</span>
            </div>
        </div>
    {/if}

    <div class="form-group-title">应用页面</div>

    {if $_W['plugin']!='merch' && !isset($_W['merch'])}
        {loop $pluginList $pluginname $plugin}
            {if !empty($plugin['status']) && p($pluginname)}
                <div class="form-group">
                    <label class="col-sm-2 control-label">{php echo m('plugin')->getName($pluginname)}</label>
                    <div class="col-sm-9 col-xs-12">
                        <select class="form-control valid" {ifp 'diypage.shop.page.save'}name="page[{$pluginname}]"{else} disabled{/if}>
                        <option value="">系统默认</option>
                        {loop $plugin['list'] $item}
                            <option value="{$item['id']}" {if $data['page'][$pluginname]==$item['id']}selected="selected"{/if}>{$item['name']}</option>
                        {/loop}
                        </select>
                    </div>
                </div>
            {/if}
        {/loop}
    {/if}

    {ifp 'diypage.shop.page.save'}
        <div class="form-group">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-9 col-xs-12">
                <input type="submit" value="提交" class="btn btn-primary"/>
            </div>
        </div>
    {/if}

</form>
{template '_footer'}